package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.PChatDetails;
import com.ruoyi.system.domain.bo.PChatDetailsBo;
import com.ruoyi.system.domain.vo.PChatDetailsVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 聊天详情Mapper接口
 *
 * @author ruoyi
 * @date 2022-08-22
 */
public interface PChatDetailsMapper extends BaseMapperPlus<PChatDetailsMapper, PChatDetails, PChatDetailsVo> {


    /**
     * 查询最近一次数据
     *
     * @param userId 用户ID
     * @return 用户对象信息
     */
    PChatDetails cancelByParams(@Param("userId") Long userId,@Param("chatId") Long chatId,@Param("orderId") String orderId);

    /**
     * 查询聊天记录
     *
     * @param chatId 列表id
     * @return 用户对象信息
     */
    List<PChatDetailsBo> pChatDetailsList(@Param("chatId") Long chatId,@Param("page") int page);


    List<PChatDetailsBo> pChatDetailsLists(@Param("chatId") Long chatId,@Param("page") int page,@Param("order")String order);
}
